<?php require __DIR__ . '/../inc_header.tpl.php';?>

<span class="layui-breadcrumb">
    <a href="<?php echo url(['platform','platform','index']);?>">控制台</a>
    <a href="">应用模块</a>
    <a><cite>已安装应用</cite></a>
</span>

<div class="layui-tab layui-tab-brief">
  <ul class="layui-tab-title">
    <li class="layui-this"><a class="layui-this" href="<?php echo url(['platform','app','installed_list']);?>">已安装应用</a></li>
    <li><a href="<?php echo url(['platform','app','not_installed_list']);?>">未安装应用</a></li>
  </ul>
</div>    
<br>
        
<div class="layui-card">
    <div class="layui-card-header">应用模块</div>
    <div class="layui-card-body">
        
        <div style="padding: 20px; ">
            <div class="layui-row layui-col-space15">

                <?php
                foreach($module_installed as $row){
                ?>
                    <div class="layui-col-sm12 layui-col-md6" style="background-color: #F2F2F2;">
                        <div class="layui-card">
                            <div class="layui-card-header">
                                <a href="<?php echo  url( $row['identifie'] .'/admin.index/index' );?>"  target="_blank" title="点击进入 <?php echo $row['name']; ?>管理" >
                                    <?php echo  $row['name']; ?>
                                    <span class="layui-badge layui-bg-orange" style="position: absolute;right: 15px; top: 12px;"><?php echo $row['identifie']; ?></span>
                                </a>
                            </div>
                            <div class="layui-card-body" style="height:100px">

                                <div class="layui-row">
                                    <div class="layui-col-xs4 layui-col-md3">
                                        <img src="./application/<?php echo $row['identifie'] .'/'. $row['icon']; ?>" style="width:60px;height:60px" loading="lazy">
                                    </div>
                                    <div class="layui-col-xs8  layui-col-md9">
										<div  style="height:50px;display: -webkit-box;overflow:hidden;-webkit-box-orient: vertical;-webkit-line-clamp: 2;color:#666;" title="<?php echo $row['description']; ?>"><?php echo $row['description']; ?></div>
                                        <hr>
                                        <div style="text-align: center">
                                            <a href="<?php echo url('platform/app/installed_do_uninstall', ['app_name'=> $row['identifie'] ]); ?>"
                                                onclick="return rj_confirm('应用卸载后，会导致用户前台无法正常访问，数据丢失。你确定卸载？', this.href )"  
                                                class="layui-btn layui-btn-primary layui-btn-xs">卸载</a>
                                        </div>
                                    </div>
                                </div>                                

                            </div>
                        </div>
                    </div>        
                <?php
                }
                ?>
            </div>
        </div>        
        
    </div>
</div>


<?php require __DIR__ . '/../inc_footer.tpl.php';?>